Feature: Authentication
  The authentication group provides functionalities for managing accounts.
  It supports creation and confirmation of new accounts, and provides access to existing ones.

  Scenario: Successful Login
    Given i am not logged in
    When i insert my e-mail and my password in the login form
    And i press the login button
    Then i should be logged in

  Scenario: Unsuccessful Login With Wrong Password
    Given i am not logged in
    When i insert my e-mail and my password in the login form
    But my password was wrong
    And i press the login button
    Then i should be not logged in
    And the system should send an error alert "Wrong Password Entered"

  Scenario: Unsuccessful Login With Wrong User
    Given i am not logged in
    When i insert my e-mail and my password login form
    But my e-mail was wrong
    And i press the login button
    Then i should not be logged in
    And the system should send an error alert "Wrong e-mail Entered"

  Scenario: Registration
    Given i am not logged in
    When i insert my e-mail and my password in the registration form
    And i press the register button
    Then i should receive a confirmation email
    And the system should ask me to check my inbox
    
  Scenario: Registration Finalization
    Given i received a confirmation email
    When i press the finalization link
    Then my account should be created
    And i should be logged in

  Scenario: Registration But User Alredy Exists
    Given i am not logged in
    When i insert my e-mail and my password in the registration form
    And i press the register button
    But my e-mail is already taken
    Then the system should send an error alert "e-mail already taken"

  Scenario: Retrieve Password
    Given i am not logged in
    When i insert my e-mail in the password retrieval form
    And i press the password retrieval button
    Then i should receive a password retrieval e-mail
    And the system should ask me to check my inbox

  Scenario: Retrieve Password Finalization
    Given i receive a password retrieval email
    And i press the password retrieval link
    When i insert my password in the new password form
    And i press the new password button
    Then my password should be updated
    And i should be logged in

  Scenario: Logout
    Given i am logged in
    When i press on the logout button
    Then i should not be logged in
    And the system should send me a notification alert "Successfully logged out"
